<%@tag description="page index" pageEncoding="UTF-8"%>
<%@ attribute name="recordCount" type="java.lang.Integer" required="true"%>
<%@ attribute name="pageSize" type="java.lang.Integer" required="true"%>

recordCount: ${ recordCount } <br>
pageSize: ${ pageSize } <br>

<%
Integer i = (Integer)jspContext.getAttribute("recordCount");
int recordCount = i.intValue();

i = (Integer)jspContext.getAttribute("pageSize");
int pageSize = i.intValue();

int pageCount = recordCount / pageSize;
if (pageCount * pageSize < recordCount) ++pageCount;
%>
pageCount: <%= pageCount %>

